<?php 
$this->jQuery()->enable();
$this->headLink()->prependStylesheet('/js/jquery/css/themes/base/jquery.ui.all.css');
$this->headScript() ->appendFile('/js/jquery/jquery-ui-1.8.12.custom.min.js')
					->appendFile('/js/jquery/ui/jquery.ui.widget.js')
					->appendFile('/js/jquery/ui/jquery.ui.core.js')					
					->appendFile('/js/jquery/ui/jquery.ui.dialog.js')					
					->appendFile('/js/jquery/ui/jquery.ui.draggable.js')
					->appendFile('/js/jquery/ui/jquery.ui.position.js')
					->appendFile('/js/jquery/ui/jquery.ui.resizable.js')
					->appendFile('/js/jquery/ui/jquery.ui.mouse.js')
					->appendFile('/js/jquery/ui/jquery.ui.button.js')					
					->appendFile('/js/geralAjax.js');
					

$this->headScript()->appendScript("
$(document).ready(function(){
 $('#confirme').dialog({
        height: 140,
        autoOpen: false,
        modal: true,
        resizable: false});               
      
});");

$translator = Zend_Registry::get('translator');
?>
<div id="flash-messeger"><?php echo $this->flashMessenger(); ?></div>
<div id="mapa">Configurações do Sistema/<span>Contas SMTP</span></div>
<table class="grid">
	<thead>
		<tr>
			
			<th><?php echo $translator->_('SMTP');?></th>
			<th><?php echo $translator->_('CONTA');?></th>
			<th><?php echo $translator->_('EMAILS_HORA');?></th>
			<th><?php echo $translator->_('ACOES');?></th>
			
		</tr>
	</thead>
	<tbody>
       <?php foreach ($this->listaContasSmtpPaginacao as $conta_smtp) :?>
        <tr>			
			<td><a title="<?php echo $translator->_('EDITAR');?>" href="<?php echo $this->url(array('action' => 'editar-conta','controller' => 'smtp','module' => 'admin','id' => $conta_smtp['idconfig_smtp']));?>"><?php echo $conta_smtp['smtp'];?></a></td>
			<td><?php echo $conta_smtp['conta'];?></td>
			<td><?php echo $conta_smtp['envioPorHora'];?></td>
			<td align="center"><?php if($conta_smtp['status']==1){?>
			<img title="<?php echo $translator->_('CONFIG_ATIVO');?>" border="0" src="/imagens/icons/tick.png">
			<?php }else{?>
			<a title="<?php echo $translator->_('CONFIG_INATIVO');?>" href="<?php echo $this->url(array('action' => 'ativar-smtp','controller' => 'smtp','module' => 'admin','id' => $conta_smtp['idconfig_smtp']));?>"><img border="0" src="/imagens/icons/tick-off.png"></a>
			<?php }?>
			<a title="<?php echo $translator->_('EXCLUIR');?>" href="javascript:void(0);" onclick="poup('/admin/smtp/remove-smtp/id/',<?php echo $conta_smtp['idconfig_smtp'];?>);"><img border="0" src="/imagens/icons/delete.png"></a>
			</td>
		</tr>
        <?php endforeach;?>
        <tr>
        <td colspan="4"><div align="right" style="font-size: 70%;"><strong><?php echo $translator->_('LEGENDA');?>:</strong>&nbsp&nbsp<img border="0" src="/imagens/icons/tick.png"> <?php echo $translator->_('CONFIG_ATIVO');?> | <img border="0" src="/imagens/icons/tick-off.png"> <?php echo $translator->_('CONFIG_INATIVO');?> | <img border="0" src="/imagens/icons/delete.png"> <?php echo $translator->_('EXCLUIR');?></div></td>
        </tr>          
    </tbody>
</table>
<?php echo $this->paginationControl($this->listaContasSmtpPaginacao, 'Sliding', 'paginacao.phtml');?>
<div id="confirme" title="<?php echo $translator->_('TITULO_EXCLUIR_SMTP');?>">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><?php echo $translator->_('MSG_DELETAR_SMTP');?></p>
</div>